package com.kaishengit.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kaishengit.dao.TaskDao;
import com.kaishengit.pojo.Task;


@Service
@Transactional
public class TaskService {

	private TaskDao taskDao;
	private List<Task> taskList;
	
	
	@Transactional(readOnly=true)
	public List<Task> findAll() {
		taskList = taskDao.findAll();
		return taskList;
	}
	
	//get  set 
	
	@Autowired
	public void setTaskDao(TaskDao taskDao) {
		this.taskDao = taskDao;
	}

	public List<Task> getTaskList() {
		return taskList;
	}
	
	
}
